package Tostring;

import java.util.Objects;

public class Studentinfo implements  Cloneable {
    private  String name;
    private  int age;
    private int[] score;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Studentinfo that = (Studentinfo) o;
        return age == that.age && Objects.equals(name, that.name);
    }//equals 的重写只需要打出"eq"两字就行了，剩下的只需要一直摁回车键就可以了

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public Studentinfo(String name, int age, int[] score) {
        this.name = name;
        this.age = age;
        this.score=score;
    }

    public Studentinfo() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int[] getScore() {
        return score;
    }

    public void setScore(int[] score) {
        this.score = score;
    }
}
